<html>
<head>
    <meta charset="utf-8">
    <title>demo</title>
    <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>

<input type="text" id="content">
<input type="button" value="send" id="send">
<script type="text/javascript">
    //var ws = new WebSocket("ws://i24o892560.qicp.vip:27439");
	var ws = new WebSocket("ws://192.168.1.36:9000");
    ws.onopen = function(){
        console.log("握手成功");
    }
    ws.onmessage = function(e){
        console.log("message:" + e.data);
    }
    ws.onerror = function(){
        console.log("error");
    }
    $("#send").click(function(){
        content = $("#content").val();
        console.log(content);
        ws.send(content);
    })
</script>
</body>
</html>